 
import { loadEnv } from 'vite'; 
import uni from '@dcloudio/vite-plugin-uni'
import path from 'path';
import uniReadPagesV3Plugin from './src/cfsheep/router/utils/uni-read-pages-v3';
// import mpliveMainfestPlugin from './src/sheep/libs/mplive-manifest-plugin';
 
import { WotResolver } from '@uni-helper/vite-plugin-uni-components/resolvers'

// https://vitejs.dev/config/
export default (command, mode) => {
  const env = loadEnv(mode, __dirname, 'CF_');
  return {
 
  plugins: [
    uni(),
    WotResolver(),	
    // viteCompression({
    // 	verbose: false
    // }),
    uniReadPagesV3Plugin({
      pagesJsonDir: path.resolve(__dirname, './src/pages.json'),
      includes: ['path', 'aliasPath', 'name', 'meta'],
    }), 
  ],
  base: './',
  server: {
    host: true,
    // open: true,
    port: 3000,
    hmr: {
      overlay: true,
    },
  },
}}
